<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="UTF-8" import="java.util.List"
	import="xyz.xiangyushui.javaBean.employee.Store"
	import="xyz.xiangyushui.javaBean.salesPlan.DailyPlanCommodity"
	import="java.time.LocalDate"
	import="java.util.Map"
	import="java.util.Iterator"%>
<%@include file="/lib/common/basedir.jsp"%>
<!DOCTYPE html>
<html lang="en">
<head>
<%@include file="/lib/common/headerResource.html"%>

<!--sidebar-->
<link href="<%=basedir%>/lib/css/sidebar.css" rel="stylesheet">

<!-- picture cover -->
<link rel="stylesheet" type="text/css"
	href="<%=basedir%>/lib/util/pictureCover/css/normalize.css" />
<link rel="stylesheet"
	href="<%=basedir%>/lib/util/pictureCover/css/style.css">

<link
	href="<%=basedir%>/lib/util/bootstrap-select/bootstrap-select.min.css"
	rel="stylesheet">

<title>DessertHouse</title>

<style>
img {
	width: 250px;
}

.rowGap2 {
	margin-bottom: 2.4em;
}

.subtitle {
	margin-top: 0.2em;
}

.formContent {
	margin-top: 3em;
	margin-bottom: 3em;
}

.line {
	margin-right: 1.5em;
}

.health-data {
	margin-top: 3em;
}

.subtitle {
	margin-top: 5px;;
}

.item {
	margin-top: 60px;
	color: white;
}

.item-value {
	color: white;
	margin-top: 0;
	padding-top: 0;
	font-size:1em;
	
}

.box-common {
	width: 170px;
	height: 170px;
	margin: 0 auto;
	-webkit-border-radius: 50%;
	-moz-border-radius: 50%;
	-o-border-radius: 50%;
	border-radius: 50%;
}

.box-1 {
	border: 1px solid #69D2E7;
	background-color: #69D2E7;
}

.box-2 {
	border: 1px solid #ff9966;
	background-color: #Ff9966;
}

.box-3 {
	border: 1px solid #ff9999;
	background-color: #ff9999;
}

.box-4 {
	border: 1px solid #99cc99;
	background-color: #99cc99;
}

.btn-days {
	margin-right: 15px;
}
</style>

</head>
<body>
	<div class="container-fluid">
		<div class="row">
			<!--左侧导航-->
			<div class="col-sm-3 col-md-2 sidebar">
				<%@include file="../sidebar.jsp"%>
			</div>

			<!--右面板-->
			<div
				class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 rightPanel">
				<div class="col-md-10">
					<div class="row">
						<ul class="nav nav-tabs">
							<li role="presentation" ><a
								href="<%=basedir%>/manager/dataAnalysis">每月销售额统计</a></li>
							<li role="presentation" class="active"><a
								href="<%=basedir%>/manager/dataAnalysis/fashionDessert">每月热门产品</a></li>
						</ul>
					</div>


					<form class="form-inline formContent" method="post"
						action="<%=basedir%>/manager/dataAnalysis/fashionDessertMonthly">
						<div class="form-group line">
							<select id="lunchBegins" name="store" class="selectpicker"
								data-live-search="true" data-live-search-style="begins"
								title="请选择店铺">
								<%
									@SuppressWarnings("unchecked")
									List<Store> stores = (List<Store>) request.getAttribute("stores");
									String date_storeId = (String) request.getAttribute("date_storeId");
									if (stores != null) {
										for (Store s : stores) {
								%>
								<option><%=s.getStoreId() + "-" + s.getStoreName()%></option>
								<%
									}
									}
								%>

							</select>
						</div>

						<div class="form-group line">
							<select id="lunchBegins" name="month" class="selectpicker"
								data-live-search="true" data-live-search-style="begins"
								title="请选择月份">
								<%
									for (int i = 0; i < 12; i++) {
								%>
								<option><%=i + 1%> 月
								</option>
								<%
									}
								%>
							</select>
						</div>
						<div class="form-group line">
							<button type="submit"
								class="btn btn-default btn-block save col-md-2">查询</button>
						</div>

					</form>

					<div class="jumbotron">
						<div class="container">
							
							<%	@SuppressWarnings("unchecked")
								Map<String,Integer> map= (Map<String,Integer>)request.getAttribute("top");
								if(map!=null){
									Iterator<Map.Entry<String, Integer>> entries = map.entrySet().iterator();
									int i=0;
									while (entries.hasNext()) {  
										  i++;
									    Map.Entry<String, Integer> entry = entries.next();  
									  String k=entry.getKey().split("-")[1];
									  int v=entry.getValue();
								
							%>
						
							<div class="item-container col-md-4 ">
								<div class="box-common box-<%=i%>">
									<h4 class="text-center item"><%=k%></h4>

									<h3 class="text-center  item-value">销量：<%=v %></h3>
								</div>
							</div>
							<%	  
									}  
								} %>

						</div>
					</div>


				</div>
			</div>
		</div>
	</div>


	<!-- jquery and bootstrap js -->
	<%@include file="/lib/common/footerResource.html"%>
	<script src="<%=basedir%>/lib/util/pictureCover/js/ns.hover.min.js"></script>
	<script
		src="<%=basedir%>/lib/util/bootstrap-select/bootstrap-select.js"></script>

	<script>
		
	</script>
</body>
</html>